smartClip = {}

-- last match for avoid relaunch callback
smartClip._lastMatch = nil

function smartClip.update(dt)
    for match in love.system.getClipboardText():gmatch '(%d+)' do
        if match:len() == 6 then
            if smartClip._lastMatch ~= match then
                smartClip._lastMatch = match
                smartClip.onCode(match)
            end
            break
        end
    end
end
